#include <iostream>
using namespace std;

int A[]={31,41,59,26,41};

void printArray(int array[],int size)
{
	if(size>0)
	{
		for(int i=0;i<size;i++)
			cout<<array[i]<<",";
		cout<<endl;
	}
	else
	{
		cout<<"Damn,give me a correct array please"<<endl;
	}
	
	
	
}
int main (int argc, char * const argv[]) {
    int key;
	int index;
	int size=(sizeof(A)/sizeof(int));
	printArray(A, size);
    cout << "Input the number you are looking for :";
	scanf("%d", &key);
	bool found=false;
	for (int i=0; i<size&&(!found); i++) {
		if(A[i]==key)
		{
				found=true;
				index=i;
		}
	}
	if(found)
		cout << "Input the number you are looking for at index of arrary:"<<index<<endl;
	else
		cout << "NIL";
    return 0;
}
